package com.example.group_20.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.group_20.entity.SLogInfor;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author: 栋
 * @data: 2023/8/11
 * @descriptions:
 */
@Mapper
public interface SLogMapper extends BaseMapper<SLogInfor> {
    @Select("select* from s_loginfor")
    public List<SLogInfor> finAll();

    @Select("select* from s_loginfor where group_id=#{group_id}")
    public List<SLogInfor> findByGroup(int group_id);

    @Update("update s_loginfor set group_id=group_id-1 where group_id>#{group_id}")
    public int updateSLogGroupId(int group_id);
}
